package com.netty.gui.javafx.ui.controls.label;/**
 * Description:
 *
 * @author: StriverFeng
 * @date: 2018-10-6
 * Details:
 */

import javafx.application.Application;
import javafx.scene.control.Label;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.paint.Color;
import javafx.stage.Stage;

public class LabelApplication extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {
    //An empty label
            Label label1 = new Label();
    //A label with the text element
            Label label2 = new Label("Search");
    //A label with the text element and graphical icon
            Image image = new Image(getClass().getClassLoader().getResourceAsStream("labels.jpg"));
            Label label3 = new Label("Search", new ImageView(image));

            primaryStage.show();

    }
}
